

<template>
  <div class="app-container">
    <div>
      <el-row :gutter="10">
        <el-col :span="6" :xs="24" :lg="24">
          <div class="bgwhite plr20 ptb20 radius10 flex-col">
            <div class="justify-between w100p">
              <div class="clr3c4 bold ft26">編輯</div>
              <div class="clr9fa align-center pointer" @click="back()">
                <el-icon>
                  <Back />
                </el-icon>
                <span class="ml5">返回上一頁</span>
              </div>
            </div>
            <div class="mt40">

              <el-form :label-position="labelPosition" label-width="auto" :model="formLabelAlign"
                style="max-width: 600px">


                <el-form-item label="審核:">
                  <el-radio-group v-model="formLabelAlign.state" class="ml-4">
                    <el-radio value="1" size="large">通過</el-radio>
                    <el-radio value="2" size="large">拒絕</el-radio>
                  </el-radio-group>
                </el-form-item>
                <el-form-item label="拒絕原因:">
                  <el-input v-model="formLabelAlign.reason" style="width: 380px;" placeholder="請輸入拒絕原因" />
                </el-form-item>
              </el-form>
              <div class="mt40 mb15 flex-cen ">
                <div class="align-center">
                  <el-button class="btn1" @click="reset()">重置</el-button>
                  <el-button class="btn2" @click="submit()">提交</el-button>
                </div>

              </div>
            </div>


          </div>

        </el-col>

      </el-row>
    </div>
  </div>
</template>

<script setup lang="ts">
import { reactive, ref, onMounted } from 'vue'
import { useRouter, useRoute } from 'vue-router';
import type { FormProps } from 'element-plus'
import { state } from '@/api/player.js'
const labelPosition = ref<FormProps['labelPosition']>('right')
const route = useRoute()
onMounted(() => {
  formLabelAlign.id = `${route.query.id}`
  formLabelAlign.state = `${route.query.state}`
})
const formLabelAlign = reactive({
  id: '',
  reason: '',
  state: ''
})
const reset = () => {

}
const submit = () => {
  state({
    id: formLabelAlign.id,
    state: formLabelAlign.state,
    reason: formLabelAlign.reason
  }).then((res) => {
    console.log(res)
    back()
  })
}
const router = useRouter()
const back = () => {
  router.back()
}
</script>
<style scoped >
:deep(.el-upload--picture-card) {
  background-color: transparent;
  border: none;
}


:deep(.el-input) {
  box-shadow: none;
}
</style>